IdeaBlade DevForce 2010 Help Reference
RemoveEntities(EntityState,Nullable<Boolean>) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class > RemoveEntities Method : RemoveEntities(EntityState,Nullable<Boolean>) Method



entityState
Entity state(s) of entities to be removed
clearQueryCache
Whether removing these entities should also cause the QueryCache to be cleared. The default 'null' value allows DevForce to make this determination based on the entities being removed.
Removes all entities with a specified EntityState from the EntityManager cache.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub RemoveEntities( _
   ByVal entityState As EntityState, _
   Optional ByVal clearQueryCache As Nullable(Of Boolean) _
) 
Visual Basic (Usage)Copy Code
Dim instance As EntityManager
Dim entityState As EntityState
Dim clearQueryCache As Nullable(Of Boolean)
 
instance.RemoveEntities(entityState, clearQueryCache)
C# 
public void RemoveEntities( 
   EntityState entityState,
   Nullable<bool> clearQueryCache
)
C++/CLI 
public:
void RemoveEntities( 
   EntityState entityState,
   Nullable<bool> clearQueryCache
) 

Parameters

entityState
Entity state(s) of entities to be removed
clearQueryCache
Whether removing these entities should also cause the QueryCache to be cleared. The default 'null' value allows DevForce to make this determination based on the entities being removed.

Remarks

The IEntity objects will be in a "detached" state after the remove. RemoveEntity and EntityAspect.RemoveFromManager can be used interchangeably

The query cache should normally be cleared after removing an entity from the entity cache, since removing an entity can invalidate the usefulness of the query cache and lead to incorrect query results. You can choose not to clear the query cache if you know that removing the entity will not cause problems.

This does not delete the entities from the backend data source. To delete an entity, use the IdeaBlade.EntityModel.Entity.Delete() method.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.